<template>
  <div>
    <van-popup v-model="show" position="bottom" :close-on-click-overlay="false">
      <van-picker
        title="请选择"
        show-toolbar
        :columns="columns"
        @confirm="onConfirm"
        @cancel="onCancel"
      />
    </van-popup>
  </div>
</template>

<script>
import { Picker, Popup } from "vant";
export default {
  props:['show',"columns"],
  components: {
    [Picker.name]: Picker,
    [Popup.name]: Popup,
  },
  data() {
      return {
        // columns: ['杭州', '宁波', '温州', '绍兴', '湖州', '嘉兴', '金华', '衢州'],
      }
  },
  methods: {
      onConfirm(list,index){
        this.$emit("config",list,index)
      },
      onCancel(){
        this.$emit("cancle",false)
      },
  },
};
</script>